<c:if test="${orderValidated == true}">            
    <div class="alert alert-success">Your order is successfully done.</div>
</c:if>
<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title">Order summary</h3>
    </div>
    <div class="panel-body">
        <div class="col-md-6">
            <table>
                <tr>
                    <td>
                        <b><c:out value="${user.firstname}"/> <c:out value="${user.lastname}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b><c:out value="${user.email}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b><c:out value="${user.phone}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        <b><c:out value="${user.address}"/></b>
                    </td>
                </tr>
            </table>
        </div>
        <div class="col-md-6">
            <table>
                <tr>
                    <td>
                        Order number : <b><c:out value="${customerOrder.id}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        Confirmation number : <b><c:out value="${customerOrder.confirmationNumber}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        Order date : <b><c:out value="${orderDate}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        Delivery address : <b><c:out value="${customerOrder.deliveryAddress}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        Delivery type : <b><c:out value="${customerOrder.deliveryType}"/></b>
                    </td>
                </tr>
                <tr>
                    <td>
                        Estimated delivery date : <b><c:out value="${deliveryDate}"/></b> (<c:out value="${customerOrder.deliveryTime}"/> days)
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>


<div class="panel panel-info">
    <div class="panel-heading">
        <h3 class="panel-title">Ordered products</h3>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <c:forEach items="${listCustomerOrderHasProduct}" var="orderProduct" varStatus="i">
                <tr>
                    <td class="col-md-1">
                        <div class="thumbnail" style="margin-bottom: 0px;">
                            <img src="<c:out value="${listProduct[i.index].imgPath}"/>" width="100%"/>
                        </div>
                    </td>
                    <td class="col-md-5">
                        <b><c:out value="${listSerie[i.index].name}"/></b><br/>
                        <b>Volume <c:out value="${listProduct[i.index].volume}"/></b>
                    </td>
                    <td class="col-md-2">
                        Unit price : <b><c:out value="${listProduct[i.index].price}"/> &euro;</b>
                    </td>
                    <td class="col-md-2">
                        Quantity : <b><c:out value="${orderProduct.quantity}"/></b>
                    </td>
                    <td class="col-md-2">
                        Total : <b><c:out value="${listProduct[i.index].price * orderProduct.quantity}"/> &euro;</b>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
</div>

<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">Order costs</h3>
    </div>
    <div class="panel-body">
        <table class="table table-striped">
            <tr>
                <td class="col-md-2">
                    Products total cost : 
                </td>
                <td class="col-md-10">
                    <b><c:out value="${productsCost}"/>&euro;</b>
                </td>
            </tr>
            <tr>
                <td class="col-md-2">
                    Shipping cost : 
                </td>
                <td class="col-md-10">
                    <b><c:out value="${customerOrder.deliveryCost}"/>&euro;</b>
                </td>
            </tr>
            <tr>
                <td class="col-md-2">
                    Amount of this order : 
                </td>
                <td class="col-md-10">
                    <b><c:out value="${customerOrder.amount}"/>&euro;</b>
                </td>
            </tr>
        </table>
    </div>
</div>